package online.siwu.encodingviewer

import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler

class WelcomeActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setWindow(true,false)
        setContentView(R.layout.activity_welcome)

        val handler = Handler()
        handler.postDelayed({ gotoActivity() }, 1000 * 2) //x秒后执行
    }

    private fun gotoActivity() {
        startActivity(Intent(this@WelcomeActivity, MainActivity::class.java))
        finish()
    }

}
